@charset "UTF-8";
@import "./common/var.css";
@import "./common/popup.css";

@component-namespace el {

  @b dialog {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-white);
    border-radius: var(--border-radius-small);
    box-shadow: var(--dialog-box-shadow);
    box-sizing: border-box;
    margin-bottom: 50px;

    @modifier tiny {
      width: var(--dialog-tiny-width);
    }

    @modifier small {
      width: var(--dialog-small-width);
    }

    @modifier large {
      width: var(--dialog-large-width);
    }

    @modifier full {
      width: 100%;
      top: 0;
      margin-bottom: 0;
      height: 100%;
      overflow: auto;
    }

    @e wrapper {
      position: fixed 0 0 0 0;
      overflow: auto;
      margin: 0;
    }

    @e header {
      padding: 20px 20px 0;
    }

    @e headerbtn {
      float: right;
      background: transparent;
      border: none;
      outline: none;
      padding: 0;
      cursor: pointer;

      .el-dialog__close {
        color: var(--dialog-close-color);
      }
      
      &:focus, &:hover {
        .el-dialog__close {
          color: var(--dialog-close-hover-color);
        }
      }
    }

    @e title {
      line-height: 1;
      font-size: var(--dialog-title-font-size);
      font-weight: bold;
      color: var(--color-base-black);
    }

    @e body {
      padding: 30px 20px;
      color: var(--color-extra-light-black);
      font-size: var(--dialog-font-size);
    }

    @e footer {
      padding: 10px 20px 15px;
      text-align: right;
      box-sizing: border-box;
    }
  }

  .dialog-fade-enter-active {
    animation: dialog-fade-in .3s;
  }

  .dialog-fade-leave-active {
    animation: dialog-fade-out .3s;
  }

  @keyframes dialog-fade-in {
    0% {
      transform: translate3d(0, -20px, 0);
      opacity: 0;
    }
    100% {
      transform: translate3d(0, 0, 0);
      opacity: 1;
    }
  }

  @keyframes dialog-fade-out {
    0% {
      transform: translate3d(0, 0, 0);
      opacity: 1;
    }
    100% {
      transform: translate3d(0, -20px, 0);
      opacity: 0;
    }
  }
}
